package com.atguigu.order.service;

import com.atguigu.common.to.mq.SeckillOrderTo;
import com.atguigu.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author polarisink
 * @email polarisink@163.com
 * @date 2020-12-18 15:29:48
 */
public interface OrderService extends IService<OrderEntity> {

  PageUtils queryPage(Map<String, Object> params);

  OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

  SubmitOrderResponseVo submitOrder(OrderSubmitVo submitVo);

  OrderEntity getOrderByOrderSn(String orderSn);

  void closeOrder(OrderEntity orderEntity);

  PageUtils getMemberOrderPage(Map<String, Object> params);

  PayVo getOrderPay(String orderSn);

  void handlerPayResult(PayAsyncVo payAsyncVo);

  void createSeckillOrder(SeckillOrderTo orderTo);
}

